Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contrib/gofiber/fiber.v2: add reference to initial middleware span/context #992

Merged
merged 11 commits into from
Aug 31, 2021
Merged

contrib/gofiber/fiber.v2: add reference to initial middleware span/context #992

merged 11 commits into from
Aug 31, 2021

Conversation

JamesChung
Copy link
Contributor

StartSpanFromContext in the middleware was throwing away the returning context
which prevents subsequent spans from referencing the original request span.
Instead we set fiber's user context as the initial middleware context which allows
users to reference that in subsequent spans via UserContext()

Fixes: #990

…text

StartSpanFromContext in the middleware was throwing away the returning context
which prevents subsequent spans from referencing the original request span.
Instead we set fiber's user context as the inital middleware context and
reference that in subsequent spans via c.UserContext()

Fixes #990
@knusbaum knusbaum added this to the 1.34.0 milestone Aug 30, 2021
Copy link
Contributor

@knusbaum knusbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We just published a release, so you'll need to upmerge to get the tests to pass.

contrib/gofiber/fiber.v2/fiber_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@knusbaum knusbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last gripe.

contrib/gofiber/fiber.v2/fiber_test.go Show resolved Hide resolved
Copy link
Contributor

@knusbaum knusbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I'll leave this open for anyone else to have an opportunity to review and then merge tomorrow if nobody has any further comments.

Copy link
Contributor

@dubonzi dubonzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@knusbaum knusbaum merged commit 82de678 into DataDog:v1 Aug 31, 2021
@JamesChung JamesChung deleted the jameschung/fix-fiber-middleware-context branch August 31, 2021 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

proposal: contrib/gofiber/fiber.v2: reference to initial middleware span/context
3 participants